import 'package:flutter/material.dart';
import 'package:we_chat_app/const.dart';
import 'package:we_chat_app/discover/discover_child_page.dart';

import 'friend/people_list.dart';

class FriendPage extends StatefulWidget {

  @override
  State createState() {
    return FriendPageState();
  }
}

class FriendPageState extends State<FriendPage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: themeColor,
        title: const Text('通讯录'),
        centerTitle: true,
        actions: [
          GestureDetector(
              child:Container(
                height: 20,
                width: 20,
                margin: EdgeInsets.only(right: 20),
                child: Icon(Icons.add_circle_outline,color: Colors.green,),
              ),
            onTap: () {
                Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext bulid){
                  return DiscoverChildPage('添加朋友');
                }));
            },
          ),
        ],
      ),
      body: PeopleList(),
    );
  }
}
